package com.sskj.mine.presenter;

import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.mine.bean.OtherRecordBean;
import com.sskj.mine.bean.PageBean;
import com.sskj.mine.bean.RechargeListBean;
import com.sskj.mine.ui.fragment.OtherRecordFragment;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonConverter;

import java.util.List;

import io.reactivex.Flowable;


public class OtherRecordFragmentPresenter extends BasePresenter<OtherRecordFragment> {
    /**
     * 冲提币记录
     *
     * @return
     */
    public Flowable<List<OtherRecordBean>> getOtherRecord(int page, int pageSize,String stockCode) {
        return httpService.getOtherRecord(page, pageSize, stockCode)
                .converter(new JsonConverter<HttpData<PageBean<OtherRecordBean>>>() {
                })
                .adapt(new FlowableBody<>())
                .map(listHttpData -> listHttpData.getData().getList());

    }
}
